package com.storm.future.red.common;

/**
 * @author gu
 * @date 2020/3/16 9:55
 */
public abstract class PowerPlant implements Building{

    protected BattleBase base;

    @Override
    public boolean construct(){
        if(!checkMoney()){
            return false;
        }
        increasePower();
        return true;
    }

    public PowerPlant(BattleBase base){
        this.base = base ;
    }

    /**
     * 提升电力
     * */
    public abstract void increasePower();

    /**
     * 检查建造的价格是否够
     * @return 价格是否充足
     * */
    public abstract boolean checkMoney();
}
